-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for armv7l. #253
Conversation
8686ecc
to
5d881ff
Compare
@Lauszus thanks for getting the ball rolling in a-scie/jump#256. |
.github/workflows/ci.yml
Outdated
cross-target: x86_64-unknown-linux-musl | ||
- os: ubuntu-24.04 | ||
name: Linux aarch64 | ||
cross-target: aarch64-unknown-linux-musl | ||
- os: ubuntu-24.04 | ||
name: Linux armv7l | ||
cross-target: armv7-unknown-linux-musleabihf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Lauszus note that no cargo config is needed for linker flags, just specifying the musl targets is enough to get you a statically linked executable:
:; file dist/ptex-linux-* | grep -v sha256
dist/ptex-linux-aarch64: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
dist/ptex-linux-arm: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
dist/ptex-linux-x86_64: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, stripped
I built those on my GNU-Linux x86-64 box using cross run -p package --target {x86_64-unknown-linux-musl,aarch64-unknown-linux-musl,armv7-unknown-linux-musleabihf}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, about as streamlined as I can imagine it being. And I concur that cross-rs
is likely the way to go (and it looks like they officially bless tonistiigi/binfmt...)
Yeah that is better. I will update my PR to use I don't think we should use |
if: matrix.cross-target != '' | ||
run: | | ||
cargo install cross --locked | ||
docker run --privileged --rm tonistiigi/binfmt --install all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker run --privileged --rm tonistiigi/binfmt --install all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line really needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Without it, lint works (cross clippy), but not test or package (cross test or cross run -p package). Although the cross images contain a cross-compiler toolchain for each target, that's only 1/2 the battle for commands like cargo test
and cargo run
, the other 1/2 is actually running the binary that is compiled and that requires qemu / binfmt support.
Co-authored-by: Kristian Sloth Lauszus <[email protected]> Signed-off-by: John Sirois <[email protected]>
Co-authored-by: Kristian Sloth Lauszus <[email protected]> Signed-off-by: John Sirois <[email protected]>
Ok, fixed up to use If this goes green I'll merge and test out the release process. If that goes well, I'll swing back to your similar scie jump change and get that released and then work on science and then Pex. Thanks again @Lauszus. |
You are welcome. I can send an initial PR for pex and science if you want, as I started on it, but then stopped as I was waiting for a new jump and ptex release. |
That sounds great. |
I opened two draft PRs: a-scie/lift#106 and pex-tool/pex#2620. I'll just clean them up a bit. |
No description provided.